import request from '../utils/request'

export function getTeacherDashboardStats() {
  return request({
    url: '/api/teacher/dashboard-stats',
    method: 'get',
  })
}

export function getWorkTimeRecordsForReview(params) {
  return request({
    url: '/api/teacher/work-time-review',
    method: 'get',
    params,
  })
}

export function reviewWorkTimeRecord(recordId, status) {
  return request({
    url: `/api/teacher/work-time-review/${recordId}`,
    method: 'put',
    params: { status },
  })
}

export function getAllTeachers() {
  return request({
    url: '/api/teacher/list',
    method: 'get',
  })
}

// 获取老师的个人信息
export function getTeacherInfo() {
  return request({
    url: '/api/teacher/info',
    method: 'get'
  })
}

// 更新老师的个人信息
export function updateTeacherInfo(data) {
  return request({
    url: '/api/teacher/info',
    method: 'put',
    data
  })
} 